package com.guigu.chenjiajun.controller;


import com.guigu.chenjiajun.service.ProductionDispatchingService;
import com.guigu.chenjiajun.vo.MManufactureVo;
import com.guigu.common.pojo.DFile;
import com.guigu.common.pojo.MApply;
import com.guigu.common.pojo.MDesignProcedureDetails;
import com.guigu.common.pojo.MDesignProcedureModule;
import com.guigu.common.vo.SearchVo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
@RequestMapping("/Dispatching")
public class ProductionDispatchingController {

    @Resource
    private ProductionDispatchingService service;

    @RequestMapping("/queryDispatching")
    @ResponseBody
    public SearchVo<MApply> queryDispatching(@RequestBody SearchVo searchVo){
        return this.service.queryDispatching(searchVo);
    }

    @RequestMapping("/showProduction")
    @ResponseBody
    public DFile showProduction(String id){
        return this.service.showProduction(id);
    }

    @RequestMapping("/PreviewTheProcess")
    @ResponseBody
    public List<MDesignProcedureDetails> PreviewTheProcess(String id){
        return this.service.PreviewTheProcess(id);
    }

    @RequestMapping("/CheckTheMaterial")
    @ResponseBody
    public List<MDesignProcedureModule> CheckTheMaterial(String id){

        return this.service.CheckTheMaterial(id);
    }


    @RequestMapping("/SubmissionPreparationSheet")
    @ResponseBody
    public int SubmissionPreparationSheet(@RequestBody MManufactureVo mProcedureVo){
        return this.service.SubmissionPreparationSheet(mProcedureVo);
    }
}
